﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% 
response.setHeader("Cache-Control","no-store"); 
response.setHeader("Pragrma","no-cache"); 
response.setDateHeader("Expires",0); 
%>
<html lang="zh-CN" style="height:auto">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户列表</title>
    <link rel="icon" href="<c:url value='/logo/logo.png'/>">
	<link rel="stylesheet" type="text/css" href="<c:url value='/css/bootstrap.min.css'/>">
    <link rel="stylesheet" type="text/css" href="<c:url value='/css/dashboard.css'/>">
    <script src="<c:url value='/js/jquery.min.js'/>"></script>
	<script src="<c:url value='/js/bootstrap.min.js'/>"></script>
	
    <script src="<c:url value='/js/html5shiv.min.js'/>"></script>
    <script src="<c:url value='/js/respond.js'/>"></script>
    <script type="text/javascript">
     function deleteall(id){
         password = prompt("请输入密码：","管理员密码");
         if(password != "99889"){
             alert("密码错误！");
         }else{
         	if(id == 1){
         		alert("密码正确。系统正在备份...");
         		$("#beifen_from").submit();
         	}else if(id == 2){
         		alert("密码正确。系统正在还原...");
         		$("#huanyuan_form").submit();
         	}
         }
     }
    </script>
  </head>
  <body style="padding:0px;background:#f1f2f3 url(<%=request.getContextPath()%>/back_pic/back_pic.jpg);height:auto" >
  
  <nav class="navbar navbar-default" style="margin-top:2%;height:auto">
  <div class="container-fluid" style="height:auto">
        <div class="main" style="height:auto">
          <h2 class="sub-header">数据备份/销毁</h2>
          <h6>请一定先执行备份后，再进行还原操作！</h6>
          <div class="table-responsive">
          <form id="beifen_form" action="<c:url value='/ExportSQLServlet?method=exp'/>" method="post" style="width: 175px; ">
          	<input type="button" class="btn btn-default" value="开始备份" onclick="deleteall(1)"/>
          </form>
          <form id="huanyuan_form" action="<c:url value='/ExportSQLServlet?method=tru'/>" method="post" style="width: 176px; ">
	        <input type="button" class="btn btn-default" value="开始还原" onclick="deleteall(2)">
          </form>
          	<h4 style="color:red">${info_exp}</h4>
          	<h4 style="color:red">${info_tru}</h4>
          </div>
        </div>
      </div>
    </div>
	</nav>
  </body>
</html>